const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

module.exports = {
    publicPath: '/platform',
    devServer: {
        open: true,
        port: 8081,
        https: false,
        hotOnly: false,
        proxy: { // 配置跨域
            '/javaApi': {//要访问的跨域的api的域名

                target: 'http://127.0.0.1:8088',
                // target: 'http://wx.zhengzhong.cn',
                // target: 'https://vip.ideamerry.com',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/javaApi': ''
                }
            },
            '/pythonApi': {//要访问的跨域的api的域名
                // target: 'http://wx.zhengzhong.cn',
                // target: 'http://192.168.9.22:5000',
                target: 'http://192.168.9.20:5000',

                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/pythonApi': ''
                }
            },
        },
        before: app => { }
    },

    configureWebpack: {
        optimization: {
            minimize: false // 关闭代码压缩
        }
    }
}